import java.util.Scanner;

public class Ex4_1{
	public static void main(String[] args){
		Scanner input = new Scanner(System.in);
		int posNum = 0;
		int negNum = 0;
		int total = 0;
		int count = 0;
		int value;
		System.out.print("Enter int values, the program exist if the input is 0: ");
		do{
			value = input.nextInt();
			if (value != 0){
				total += value;
				count++;
				if (value > 0)
					posNum++;
				else
					negNum++;
			}
		} while (value != 0);
		System.out.printf("The number of positives is %d\n", posNum);
		System.out.printf("The number of negatives is %d\n", negNum);
		System.out.printf("The total is %d\n", total);
		System.out.printf("The average is %.2f\n", total*1.0 / count);
	}
}